package cn.hxth.cloud.consumer.controller;

import cn.hxth.cloud.api.domain.ProductInputOrder;
import cn.hxth.cloud.service.service.WmsService;
import org.apache.shiro.SecurityUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.servlet.http.HttpServletRequest;

@RestController
@RequestMapping("/pages/wms/")
public class WmsController {
    @Autowired
    private WmsService wmsService ;
    @PostMapping("insertSteelsInputOrder")
    public Boolean insertSteelsInputOrder(HttpServletRequest request){
        String mid = SecurityUtils.getSubject().getPrincipal().toString();
        return this.wmsService.insertSteelsInputOrder(mid) ;
    }
    @PostMapping("insertProductInputOrder")
    public  Boolean insertProductInputOrder(){
        ProductInputOrder productInputOrder = new ProductInputOrder() ;
        return this.wmsService.insertProductInputOrder(productInputOrder) ;
    }
}
